.TH std::atomic::fetch_xor 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::atomic::fetch_xor \- std::atomic::fetch_xor

.SH Synopsis
   member only of atomic<Integral > specializations
   T fetch_xor( T arg, std::memory_order order =                      \fB(1)\fP \fI(since C++11)\fP
                           std::memory_order_seq_cst ) noexcept;
   T fetch_xor( T arg, std::memory_order order =
                           std::memory_order_seq_cst ) volatile       \fB(2)\fP \fI(since C++11)\fP
   noexcept;

   Atomically replaces the current value with the result of bitwise XOR of the value
   and arg. The operation is read-modify-write operation. Memory is affected according
   to the value of order.

   It is deprecated if std::atomic<T>::is_always_lock_free is false and   \fI(since C++20)\fP
   overload \fB(2)\fP participates in overload resolution.

.SH Parameters

   arg   - the other argument of bitwise XOR
   order - memory order constraints to enforce

.SH Return value

   The value immediately preceding the effects of this function in the modification
   order of *this.

.SH See also

   atomic_fetch_xor          replaces the atomic object with the result of bitwise XOR
   atomic_fetch_xor_explicit with a non-atomic argument and obtains the previous value
   \fI(C++11)\fP                   of the atomic
   \fI(C++11)\fP                   \fI(function template)\fP
